<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var num1 = 5;
        var num2 = num1;
        // 基本数据类型，进行的是值的比较
        console.log(num1 === num2);// true
        num1 = 6;
        console.log(num1, num2);// 6 5

        var obj1 = {
            name:'atguigu'
        }

        var obj2 = obj1;
        // 引用数据类型，是地址的操作
        console.log(obj1 === obj2);

        obj1.name = '尚硅谷';
        console.log(obj1.name, obj2.name);//尚硅谷 尚硅谷

    </script>
</body>
</html>